Page({
  getOpenid() {
    wx.cloud.callFunction({
      name:"pay",
      success(res){
        console.log("获取成功",res)
      },
      fail(err){
        console.log("获取失败",err)
      }
    })
  },
  //微信支付
  goPay(payData){
    wx.requestPayment({
      nonceStr: payData.nonceStr,
      package: payData.package,
      paySign: payData.paySign,
      timeStamp: payData.timeStamp,
      signType: 'MD5',
      success(res){
        console.log("支付成功",res);
      },
      fail(res){
        console.log("支付失败",res);
      }
    })
  }
})
